PATH![]() |
![]() ![]() |
Calls a nonreentrant function and blocks the current task.
void *MPRemoteCall (
MPRemoteProcedure remoteProc,
void *parameter,
MPRemoteContext context);
You use this function primarily to indirectly execute Mac OS system software functions. The task making the remote call is blocked until the call completes. The amount of time taken to schedule the remote procedure depends on the choice of the designated operating context. Specifying kMPAnyRemoteContext offers the lowest latency, but the called procedure may not have access to process-specific resources such as some low-memory values. Specifying kMPOwningProcessRemoteContext has higher latency because the remote procedure is deferred until the owning process becomes active. However, the remote procedure is guaranteed to execute within the owning process.
Note that with the exception of functions in Multiprocessing Services, you cannot safely call any system software functions directly from a preemptive task. Even if some system software function appears to work today when called from a preemptive task, unless explicitly stated otherwise there is no guarantee that subsequent versions of the same function will continue to work in future versions of system software. In Mac OS 8 implementations of Multiprocessing Services, the only exceptions to this rule are the atomic memory operations (such as AddAtomic ) exported in the InterfaceLib shared library. Even these functions may switch to 68K mode if the operands to them are not aligned. If you need to access system software functions from a preemptive task, you must do so using the MPRemoteCall function.